Passed
Pull Request — master (#160)
by
unknown
01:43
created

util-frame-options.ts ➔ getFrameOptions   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
1
import { FrameOptions, FRAME_OPTIONS } from './definitions/FrameOptions'
2
import { isKeyOf } from './util'
3
4
export function getFrameOptions(frameIdentifier: string): FrameOptions {
5
    if (isKeyOf(frameIdentifier, FRAME_OPTIONS)) {
6
        return FRAME_OPTIONS[frameIdentifier]
7
    }
8
    return {
9
        multiple: false
10
    }
11
}
12